package org.zoomdev.zoom;

import org.zoomdev.zoom.common.json.JSON;
import org.zoomdev.zoom.dao.adapters.DataAdapter;

public class JsonAdapter implements DataAdapter<Object, String> {

    @Override
    public String toDbValue(Object objects) {
        return JSON.stringify(objects);
    }

    @Override
    public Object toEntityValue(String s) {
        return JSON.parse(s, Object.class);
    }
}
